<script>
	export default {
		onLaunch: function() {
			console.log('App Launch')



		},
		onShow: function() {
			console.log('App Show')
			this.$sqlDBConfig.initLocalDataBase();
			this.initPageTimeClick();
		},
		onHide: function() {
			console.log('App Hide')
		},
		methods: {

			initPageTimeClick() {
		
				let data = 0
				let that = this;
				setInterval(() => {
					data = data + 30
					that.getTimeNumValue(data);
				}, 30000)


			},
			getTimeNumValue(data) {
				
				let fenOld = data / 60 + 1
				let fenValue = Math.floor(fenOld);
				this.$globalData.appRunTime = fenValue;
				uni.$emit("appRunTime",this.$globalData.appRunTime)

			}
		},
		beforeCreate() {
			this.$options.startTime = new Date();
		},
	}
</script>

<style lang="scss">
	@import "./static/iconfont/iconfont.css";
	/*每个页面公共css */
	@import "uview-ui/index.scss";
</style>